package com.example.xm.controller;

import com.example.xm.entity.Geci;
import com.example.xm.entity.Yinyue;
import com.example.xm.service.IGeciService;
import com.example.xm.service.IYinyueService;
import com.example.xm.web.Result;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/geci")
public class GeciController {
    @Autowired
    IGeciService geciService;
    @GetMapping("/list")
    public Result list(Geci geci) {
        List<Geci> geshous = geciService.selectList(geci);
        return Result.success(geshous);
    }
    @PostMapping("/add")
    public Result add(@RequestBody List<Geci> geci) {
        return Result.success(geciService.add(geci));
    }
}
